package com.duanxian.controller;

import com.duanxian.Main;
import com.duanxian.service.BaseServiceImpl;
import de.felixroske.jfxsupport.FXMLController;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * Created by llx on 2017/8/12.
 * @author min
 * @description 登录控制器
 */
@FXMLController
public class LoginController {

    @FXML
    private TextField userName;

    @FXML
    private PasswordField password;

    @Autowired
    private BaseServiceImpl baseService;

    @FXML
    protected void handleSubmitButtonAction(ActionEvent event){
        Main.showView(MainView.class);
        List<Map<String, Object>> user = baseService.getUser();
        System.out.println(user);


    }
}
